<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>Mímir</title>
		<style>
			a {
				color: #00afff;
				text-decoration: none;
			}
			a:hover {
				text-decoration: underline;
			}
		</style>
	</head>
	<body style="font-family: monospace; background-color: #292929; color: #fafafa;">
		<a href="/mimir"><header style="color: #fafafa; font-size: 1.25rem; padding-top: .3125rem; padding-bottom: .3125rem; margin-rigt: 1rem;">mímir for git.apiote.xyz</header></a> <!-- todo mimir for {config:??} -->
		<div style="display: flex; flex-wrap: wrap; justify-content: space-between; margin: 1rem;">
			<div>
				{{if gt .Page 1}}
				<a href="/mimir?page={{.PrevPage}}">previous page</a>
				{{end}}
			</div>
			<div>
				{{if lt .Page .NumPages}}
				<a href="/mimir?page={{.NextPage}}">next page</a>
				{{end}}
			</div>
		</div>
		<main style="margin-left: 1rem; margin-top: 2rem;">
			{{if not .Messages}}
				<span style="font-size: 2rem; color: #ff5c57;">No messages</span>
			{{else}}
			{{range .Messages}}
				<div style="margin-bottom: 2rem; width: 85%; background-color: #212121; padding-left: 1rem; padding-right: 1rem; padding-bottom: .5rem;">
					<div style="padding: .5rem 0; display: block; border-bottom: 1px solid #e9ecef; display: flex; flex-wrap: wrap">
						<div style="flex: auto; padding-right: 1rem;"><a style="font-size: 1.25rem;" href="/mimir/m/{{.Thread}}{{if ne .Thread .ID}}#{{.ID}}{{end}}">{{.Subject}}</a></div>
						<div style="flex: none; margin-top: .5rem; margin-bottom: .1rem;">{{.FormatDate}}</div>
					</div>
					<div style="margin-top: .5rem; font-size: 1rem;">{{.Sender}} to {{.Category}}</div>
					<blockquote style="border-left: 2px solid #aaa; margin-left: .1rem; margin-bottom: 1rem;"><pre style="margin-left: .5rem; overflow: auto">{{.Body}}</pre></blockquote>
				</div>
			{{end}}
			{{end}}
		</main>
		<div style="display: flex; flex-wrap: wrap; justify-content: space-between; margin: 1rem;">
			<div>
				{{if gt .Page 1}}
				<a href="/mimir?page={{.PrevPage}}">previous page</a>
				{{end}}
			</div>
			<div>
				{{if lt .Page .NumPages}}
				<a href="/mimir?page={{.NextPage}}">next page</a>
				{{end}}
			</div>
		</div>
	</body>
</html>
